home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / USRBRI / OEMSETUP.INF < prev    next >
INI File  |  1996-07-31  |  56KB  |  1,428 lines

  1. ;***********************************************************************
  2. ; U.S. Robotics Sportster ISDN 128K WindowsNT Setup File.
  3. ;***********************************************************************
  4. [Identification]
  5.     OptionType = NetAdapter
  6.  
  7. ;***********************************************************************
  8. ;
  9. ;***********************************************************************
  10. [PlatformsSupported]
  11.     ISA
  12.     EISA
  13.  
  14. ;***********************************************************************
  15. ;
  16. ;***********************************************************************
  17. [Options]
  18.     USRBRI
  19.  
  20. ;***********************************************************************
  21. ;
  22. ;***********************************************************************
  23. [FileConstants]
  24.     USRGroup                = "Sportster ISDN 128K Tools"
  25.     USRLineMon              = "Line Monitor"
  26.     USRProtMon              = "Protocol Monitor"
  27.     ToolsGuide                = "Tools Guide"
  28.     RlsNotes                = "Release Notes"
  29.     InfName                 = "OEMUSRBR.INF"
  30.     UtilityInf              = "UTILITY.INF"
  31.     ParamInf                = "NCPARAM.INF"
  32.     subroutineinf           = "SUBROUTN.INF"
  33.     SoftwareType            = "driver"
  34.     Exit_Code               = 0
  35.     NetEventDLL             = "%SystemRoot%\System32\netevent.dll"
  36.     IoLogMsgDLL             = "%SystemRoot%\System32\IoLogMsg.dll"
  37.     Manufacturer            = "USR"
  38.     ProductMajorVersion     = "1"
  39.     ProductMinorVersion     = "0"
  40.     ProductVersion          = $(ProductMajorVersion)"."$(ProductMinorVersion)
  41.     ProductSoftwareName     = "USRBRI"
  42.     ProductSoftwareImagePath = "\SystemRoot\System32\drivers\USRBRI.sys"
  43.     NetRuleSoftwareType     = "USRBRISys USRBRIDriver"
  44.     NetRuleSoftwareUse      = $(SoftwareType)
  45.     NetRuleSoftwareBindForm = """USRBRISys"" yes no container"
  46.     NetRuleSoftwareClass    = {"USRBRIDriver basic"}
  47.     NetRuleSoftwareBindable = {"USRBRIDriver USRBRIAdapter non exclusive 100"}
  48.     ProductHardwareName     = "USRBRI"
  49.     NetRuleHardwareBindForm = " yes yes container"
  50.     NetRuleHardwareUSRBRIType = "USRBRI USRBRIAdapter"
  51.     NetRuleHardwareUSRBRIClass = {"USRBRIAdapter basic"}
  52.     BindableUSRBRITxt      = {"USRBRIDriver USRBRIAdapter non exclusive 100"}
  53.     DeviceMap               = "HARDWARE\DEVICEMAP"
  54.     TapiDevices             = "TAPI DEVICES"
  55.     TapiDeviceKey           = $(ProductHardwareName)
  56.     TapiMediaType           = "ISDN"
  57.     ProductKeyName          = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
  58.                               $(ProductSoftwareName)"\CurrentVersion"
  59.     ParamKeyName            = $(!NTN_ServiceBase)"\"$(ProductHardwareName)+
  60.                               "\Parameters"
  61.     USRDir                  = $(!STF_CWDDIR)USR
  62.     USRBRIDir             = $(!STF_CWDDIR)USR\BRI
  63.     ProductPath             = $(USRBRIDir)"\"
  64.  
  65. ;   FIXME - default to dialup line mode = 1 -- leased line = 0
  66. ;   In dialup mode we need to write the parameters so RAS/TAPI will bind to us
  67. ;   In leased mode we need to write the parameters so NDIS/WAN will bind to us
  68. ;   Right now this file only supports dialup mode - leased line changes are needed 
  69.     LineType                = 1
  70.  
  71. ;***********************************************************************
  72. ;
  73. ;***********************************************************************
  74. [GeneralConstants]
  75. !DebugOutputControl = 0
  76.  
  77.     from                    = ""
  78.     to                      = ""
  79.     ExitCodeOk              = 0
  80.     ExitCodeCancel          = 1
  81.     ExitCodeFatal           = 2
  82.     KeyNull                 = ""
  83.     MAXIMUM_ALLOWED         = 33554432
  84.     RegistryErrorIndex      = NO_ERROR
  85.     KeyProduct              = ""
  86.     KeyParameters           = ""
  87.     TRUE                    = 1
  88.     FALSE                   = 0
  89.     NoTitle                 = 0
  90.     ExitState               = "Active"
  91.     OldVersionExisted       = $(FALSE)
  92.     DriverPath              = $(!STF_NTPATH)\drivers
  93.     CreateIcons             = $(TRUE)
  94.     DeleteIcons             = $(TRUE)
  95.  
  96. ;***********************************************************************
  97. ;
  98. ;***********************************************************************
  99. [Date]
  100.     Now                     = {} ? $(!LIBHANDLE) GetSystemDate
  101.  
  102. ;***********************************************************************
  103. ;
  104. ;***********************************************************************
  105. [Identify]
  106.     Read-Syms Identification
  107.     Set Status      = STATUS_SUCCESSFUL
  108.     Set Identifier  = $(OptionType)
  109.     Set Media       = #("Source Media Descriptions", 1, 1)
  110.     Return $(Status) $(Identifier) $(Media)
  111.  
  112. ;***********************************************************************
  113. ;
  114. ;***********************************************************************
  115. [ReturnOptions]
  116.     Set Status          = STATUS_FAILED
  117.     Set OptionList      = {}
  118.     Set OptionTextList  = {}
  119.     Set LanguageList    = ^(LanguagesSupported, 1)
  120.  
  121.     IfContains(i) $($0) in $(LanguageList)
  122.         IfStr(i) $($1) == ""
  123.             GoTo SetOptions
  124.         EndIf
  125.         Set PlatformList = ^(PlatformsSupported, 1)
  126.         IfContains(i) $($1) in $(PlatformList)
  127.             GoTo SetOptions
  128.         Else
  129.             Set Status = STATUS_NOTSUPPORTED
  130.             GoTo ExitReturnOptions
  131.         EndIf
  132.     Else
  133.         Set Status = STATUS_NOLANGUAGE
  134.         GoTo ExitReturnOptions
  135.     EndIf
  136.  
  137. SetOptions = +
  138.     Set OptionList     = ^(Options, 1)
  139.     Set OptionTextList = ^(OptionsText$($0), 1)
  140.     Set Status         = STATUS_SUCCESSFUL
  141.  
  142. ExitReturnOptions = +
  143.     Return $(Status) $(OptionList) $(OptionTextList)
  144.  
  145. ;***********************************************************************
  146. ;
  147. ;***********************************************************************
  148. [InstallOption]
  149.     Set Status   = STATUS_FAILED
  150.     Set Option   = $($1)
  151.     Set SrcDir   = $($2)
  152.     Set RasDir   = $($2)
  153.     Set AddCopy  = $($3)
  154.     Set DoCopy   = $($4)
  155.     Set DoConfig = $($5)
  156.     Set LanguageList = ^(LanguagesSupported, 1)
  157.  
  158.     IfContains(i) $($0) NOT-IN $(LanguageList)
  159.         Return STATUS_NOLANGUAGE
  160.     EndIf
  161.  
  162.     Set-Subst LF = "\n"
  163.  
  164.     Read-Syms GeneralConstants
  165.     Read-Syms FileConstants
  166.  
  167.     IfStr(i) $(!NTN_Origination) == "NCPA"
  168.         Set Continue = $(OK)
  169.     EndIf
  170.  
  171.     Read-Syms FileConstants$(!STF_LANGUAGE)
  172.     Detect Date
  173.     Set-Title  $(FunctionTitle)$(Option)
  174.  
  175.     Set to   = Begin
  176.     Set from = Begin
  177.     Set CommonStatus = STATUS_SUCCESSFUL
  178.  
  179.     EndWait
  180.  
  181. ;***********************************************************************
  182. ;
  183. ;***********************************************************************
  184. Begin = +
  185.     Set ActivateDetection = FALSE
  186.     IfStr(i) $(!NTN_InstallMode) == deinstall
  187.         Set StartLabel = RemoveAdapter
  188.     Else-IfStr(i) $(!NTN_InstallMode) == Update
  189.         Set StartLabel = UpgradeSoftware
  190.     Else-IfStr(i) $(!NTN_InstallMode) == bind
  191.         Set StartLabel = BindingAdapter
  192.     Else-IfStr(i) $(!NTN_InstallMode) == configure
  193.         Set StartLabel = ConfigureAdapter
  194.         Set ActivateDetection = TRUE
  195.         Set CommonStatus = STATUS_REBOOT
  196.         IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  197.             Debug-Output $(InfName)": Cannot configure the U.S. Robotics BRI ISDN driver software."
  198.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  199.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  200.                 Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  201.                 GoTo ShellCodeError
  202.             EndIf
  203.             Set Error = $($R0)
  204.             Set from = end
  205.             Set to = end
  206.             GoTo NonFatalInfo
  207.         EndIf
  208.     Else
  209.         Set StartLabel = InstallAdapter
  210.         Set ActivateDetection = TRUE
  211.         Set OEM_ABANDON_OPTIONS = {}
  212.         Set OEM_ABANDON_SOFTWARE = FALSE
  213.         Set OEM_ABANDON_ON = TRUE
  214.     EndIf
  215.  
  216.     Debug-Output $(InfName)": =================================================="
  217.     Debug-Output $(InfName)": STF_CWDIR is: "$(!STF_CWDIR)
  218.     Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE)
  219.     Debug-Output $(InfName)": Option is: "$(Option)
  220.     Debug-Output $(InfName)": !STF_NCDETECT  is: "$(!STF_NCDETECT)
  221.     Debug-Output $(InfName)": !STF_NCOPTION  is: "$(!STF_NCOPTION)
  222.     Debug-Output $(InfName)": !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  223.     Debug-Output $(InfName)": !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  224.     Debug-Output $(InfName)": =================================================="
  225.  
  226.     Set DetectedCard = FALSE
  227.     IfStr(i) $(ActivateDetection) != TRUE
  228.         GoTo $(StartLabel)
  229.     EndIf
  230.  
  231.     Debug-Output $(InfName)": Calling Param_SetDefaults"
  232.     Shell $(ParamInf) Param_SetDefaults {}
  233.  
  234.     IfStr(i) $(!STF_NCDETECT) == YES
  235.         IfStr(i) $(!STF_NCOPTION) == $(Option)
  236.            Set DetectedCard = TRUE
  237.            Debug-Output $(InfName)": Setting DetectedCard to TRUE"
  238.         EndIf
  239.     EndIf
  240.  
  241.     Shell "" DebugConfiguration "After parameter querying"
  242.     Set from = FatalError
  243.     Set to = FatalError
  244.     GoTo $(StartLabel)
  245.  
  246. ;***********************************************************************
  247. ;
  248. ;***********************************************************************
  249. InstallAdapter = +
  250.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  251.     IfStr $(KeyProduct) != $(KeyNull)
  252.         CloseRegKey $(KeyProduct)
  253.         IfStr(i) !(NTN_RegBase) == $(ProductKeyName)
  254.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  255.                $(ProductVersion)
  256.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  257.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  258.                GoTo ShellCodeError
  259.            EndIf
  260.            GoTo end
  261.         Else
  262.            Debug-Output $(InfName)": CardExistedDlg."
  263.  
  264. ;-----------------
  265.            set NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  266.            OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(MAXIMUM_ALLOWED) IE_KeyNetcards
  267.            ifstr(i) $(IE_KeyNetcards) != ""
  268.                EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  269.                ForListDo $(IE_KeyNameList)
  270.                    OpenRegKey $(IE_KeyNetcards) "" *($($),1) +
  271.                          $(MAXIMUM_ALLOWED) NetworkCardKey
  272.                    Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  273.                        GetRegValue $(NetworkCardKey),"Manufacturer", ManufacturerInfo
  274.                        set ManufacturerName = *($(ManufacturerInfo), 4)
  275.                        Debug-Output "   Manufacturer = "$(ManufacturerName)
  276.                        Ifstr $(ManufacturerName) != $(Manufacturer)
  277.                            goto nextnetcard2
  278.                        endif
  279.                        GetRegValue $(NetworkCardKey),"ProductName", ProductNameInfo
  280.                        set ProductName = *($(ProductNameInfo), 4)
  281.                        Debug-Output "   ProductName = "$(ProductName)
  282.                        Ifstr(i) $(ProductName) != "USRBRI"
  283.                            goto nextnetcard2
  284.                        endif
  285.                        OpenRegKey $(NetworkCardKey) "" "NetRules" +
  286.                            $(MAXIMUM_ALLOWED) NetRuleKey
  287.                        Ifstr $(NetRuleKey) != $(KeyNull)
  288.                           GetRegValue $(NetRuleKey),"InfOption", InfOptionInfo
  289.                           set InfOption = *($(InfOptionInfo), 4)
  290.                           Debug-Output "InfOption = "$(InfOption)
  291.                        endif
  292.                        Ifstr(i) $(InfOption) == $(Option)
  293.                            set CreateIcons = $(FALSE)
  294.                            Debug-Output "CreateIcons FALSE"
  295.                        endif
  296.                        CloseRegKey $(NetRules)
  297.                        CloseRegKey $(NetworkCardKey)
  298.                    endif
  299. nextnetcard2 = +
  300.                EndForListDo
  301.                CloseRegKey $(IE_KeyNetcards)
  302.            endif
  303. ;-----------------
  304.  
  305.            Shell $(UtilityInf), CardExistedDlg
  306.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  307.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  308.                GoTo ShellCodeError
  309.            EndIf
  310.            IfStr(i) $($R1) != "OK"
  311.                Set CommonStatus = STATUS_USERCANCEL
  312.                GoTo end
  313.            EndIf
  314.            Set OldVersionExisted = $(TRUE)
  315.         EndIf
  316.     EndIf
  317.  
  318.     Set CurrParamSettings = {}
  319.     IfStr(i) $(DetectedCard) != TRUE
  320.         GoTo AdapterSetup
  321.     EndIf
  322.  
  323.     StartWait
  324.         Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  325.     EndWait
  326.  
  327.     IfStr(i) $($R0) != STATUS_SUCCESSFUL
  328.         GoTo AdapterSetup
  329.     EndIf
  330.  
  331.     Set DetectedParams = $($R1)
  332.     Debug-Output $(InfName)": Calling Param_SetDefaults to merge detected params"
  333.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  334.     GoTo AdapterSetup
  335.  
  336. ;***********************************************************************
  337. ;
  338. ;***********************************************************************
  339. ConfigureAdapter = +
  340.     IfStr $(KeyProduct) == $(KeyNull)
  341.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  342.         IfStr $(KeyProduct) == $(KeyNull)
  343.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  344.             Debug-Output $(InfName)": Cannot find component product key"
  345.             GoTo FatalRegistry
  346.         EndIf
  347.     EndIf
  348.  
  349.     Debug-Output $(InfName)": Shelling to FindService"
  350.     Shell $(UtilityInf) FindService, $(KeyProduct)
  351.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  352.         Debug-Output $(InfName)": FindService shell failure"
  353.         GoTo ShellCodeError
  354.     EndIf
  355.     IfStr(i) $($R0) != NO_ERROR
  356.         Debug-Output $(InfName)": FindService Shell error: "$($R0)
  357.         GoTo FatalRegistry
  358.     EndIf
  359.  
  360.     Set KeyParameters = $($R2)
  361.     CloseRegKey $($R1)
  362.     IfStr $(KeyParameters) == $(KeyNull)
  363.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  364.         Debug-Output $(InfName)": Cannot find component service"
  365.         GoTo FatalRegistry
  366.     EndIf
  367.  
  368.     Set OldVersionExisted = $(TRUE)
  369.     Set ValueName = ""
  370.     Set ValueData = ""
  371.     Set ValueStr  = ""
  372.     Set ValueList = {}
  373.     EnumRegValue $(KeyParameters) ValueList
  374.     ForListDo $(ValueList)
  375.         Set ValueItem = $($)
  376.         Set ValueName = *($(ValueItem),1)
  377.         Set ValueData = *($(ValueItem),4)
  378.         Debug-Output $(InfName)": "$(ValueName)"="$(ValueData)
  379.         IfStr(i) $(ValueName) == "LineType"
  380.             Set LineType = $(ValueData)
  381.         Else-IfStr(i) $(ValueName) == "BusNumber"
  382.             set BusNumber = $(ValueData)
  383.         Else-IfStr(i) $(ValueName) == "BusType"
  384.             set BusType = $(ValueData)
  385.         Else-IfStr(i) $(ValueName) == "ADP_Number"
  386.             set AdpNumber = $(ValueData)
  387.         EndIf
  388.     EndForListDo
  389.     Shell $(ParamInf) Param_SaveValues
  390.     Set CurrParamSettings = $($R0)
  391.  
  392. ;***********************************************************************
  393. ;
  394. ;***********************************************************************
  395. AdapterSetup = +
  396.     Shell "" DebugConfiguration "before displaying dialog"
  397.     Set from = AdapterOptions
  398.     Shell $(ParamInf) Param_ParameterConfidence
  399.     IfStr(i) $($R0) != STATUS_SUCCESSFUL
  400.         Debug-Output $(InfName)": parameter confidence too low to bypass configuration"
  401.         GoTo AdapterOptions
  402.     EndIf
  403.     IfStr(i) $(DetectedCard) == TRUE
  404.         IfStr(i) $(!STF_INSTALL_MODE) != CUSTOM
  405.             GoTo AdapterVerify
  406.         EndIf
  407.     EndIf
  408.  
  409. ;***********************************************************************
  410. ;
  411. ;***********************************************************************
  412. AdapterOptions = +
  413.     IfStr(i) $(!STF_NCDETINFO) == {}
  414.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusType) $(BusNumber)
  415.         ifInt $($ShellCode) != $(!SHELL_CODE_OK)
  416.             Debug-Output $(InfName)": ShellCode error."
  417.             GoTo ShellCodeError
  418.         EndIf
  419.         Set BusType = $($R1)
  420.         Set BusNumber = $($R2)
  421.     Else
  422.         Set BusType = *($(!STF_NCDETINFO),5)
  423.         Set BusNumber = *($(!STF_NCDETINFO),6)
  424.     EndIf
  425.  
  426. ;***********************************************************************
  427. ;
  428. ;***********************************************************************
  429. AdapterVerify = +
  430.     Shell "" DebugConfiguration "after running dialog"
  431.     IfStr(i) $(DetectedCard) != TRUE
  432.         Shell $(ParamInf) Param_SaveValues
  433.         Set NewParamSettings = $($R0)
  434.         IfStr(i) $(CurrParamSettings) == {}
  435.             Set DiffParamSettings = $(NewParamSettings)
  436.         Else
  437.             Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
  438.             Set DiffParamSettings = $($R0)
  439.         EndIf
  440.         Debug-Output $(InfName)": Calling Param_VerifyResources"
  441.         Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
  442.         IfStr(i) $($R0) == STATUS_SUCCESSFUL
  443.             Debug-Output $(InfName)": Param_VerifyResources succeeded"
  444.             GoTo SkipOptions
  445.         EndIf
  446.     Else
  447.         Set CardVerifyIndex = $(!STF_NCDETCARD)
  448.         Debug-Output $(InfName)": Calling Param_VerifyCard"
  449.         Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  450.         IfStr(i) $($R0) == STATUS_SUCCESSFUL
  451.             Debug-Output $(InfName)": Param_VerifyCard succeeded"
  452.             GoTo SkipOptions
  453.         EndIf
  454.     EndIf
  455.  
  456.     Set from = AdapterOptions
  457.     Set to = SkipOptions
  458.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  459.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  460.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  461.         GoTo ShellCodeError
  462.     EndIf
  463.     Set Error = $($R0)
  464.     GoTo WarningMsg
  465.  
  466. ;***********************************************************************
  467. ;
  468. ;***********************************************************************
  469. SkipOptions =+
  470.     IfInt $(OldVersionExisted) == $(TRUE)
  471.         IfStr(i) $(!NTN_InstallMode) == configure
  472.             GoTo WriteParameters
  473.         EndIf
  474.     EndIf
  475.     StartWait
  476.     IfInt $(OldVersionExisted) == $(FALSE)
  477.         IfStr(i) $(!NTN_InstallMode) == "install"
  478.            IfStr(i) $(DoCopy) == "YES"
  479.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  480.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  481.                   GoTo ShellCodeError
  482.               Else-IfStr(i) $($R0) == STATUS_FAILED
  483.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  484.                   IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  485.                       GoTo ShellCodeError
  486.                   EndIf
  487.                   Set Error = $($R0)
  488.                   GoTo FatalError
  489.               Else-IfStr(i) $($R0) == STATUS_USERCANCEL
  490.                   GoTo SuccessfulOption
  491.               EndIf
  492.               Set SrcDir = $($R1)
  493.            EndIf
  494.  
  495.            Install "Install-Option"
  496.            IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  497.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  498.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  499.                   GoTo ShellCodeError
  500.               EndIf
  501.               Set Error = $($R0)
  502.               GoTo FatalError
  503.            EndIf
  504.         EndIf
  505.  
  506.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  507.             $(ProductSoftwareName), +
  508.             $(ProductSoftwareName), +
  509.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  510.             $(ProductSoftwareImagePath), "kernelautostart", "NDIS", {}, "",+
  511.             $(NetEventDLL)
  512.         Set OEM_ABANDON_SOFTWARE = TRUE
  513.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  514.             Debug-Output $(InfName)": ShellCode error"
  515.             GoTo ShellCodeError
  516.         EndIf
  517.         Set RegistryErrorIndex = $($R0)
  518.         Set KeyProduct      = $($R1)
  519.         Set SoftNetRulesKey = $($R2)
  520.         CloseRegKey $($R3)
  521.         CloseRegKey $($R4)
  522.         CloseRegKey $($R5)
  523.  
  524.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  525.             EndWait
  526.             Debug-Output $(InfName)": Registry error: add software components"
  527.             CloseRegKey $(KeyProduct)
  528.             CloseRegKey $(SoftNetRulesKey)
  529.             GoTo FatalRegistry
  530.         EndIf
  531.  
  532.         Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  533.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  534.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  535.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  536.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  537.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  538.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  539.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  540.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  541.             Debug-Output $(InfName)": ShellCode error."
  542.             GoTo ShellCodeError
  543.         EndIf
  544.         Set RegistryErrorIndex = $($R0)
  545.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  546.             EndWait
  547.             Debug-Output $(InfName)": Registry error: add value list."
  548.             CloseRegKey $(KeyProduct)
  549.             CloseRegKey $(SoftNetRulesKey)
  550.             GoTo FatalRegistry
  551.         EndIf
  552.  
  553.         Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  554.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  555.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  556.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  557.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(Bindable$(Option)Txt)}, +
  558.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  559.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  560.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  561.             Debug-Output $(InfName)": ShellCode error."
  562.             GoTo ShellCodeError
  563.         EndIf
  564.         Set RegistryErrorIndex = $($R0)
  565.         CloseRegKey $(KeyProduct)
  566.         CloseRegKey $(SoftNetRulesKey)
  567.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  568.             EndWait
  569.             Debug-Output $(InfName)": Resgitry error: add value list."
  570.             GoTo FatalRegistry
  571.         EndIf
  572.     EndIf
  573.  
  574.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  575.     Set AdpNumber = $($R4)
  576.     IfInt $($R4) != -1
  577.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  578.     EndIf
  579.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  580.         Debug-Output $(InfName)": Cannot add hardware component"
  581.         GoTo ShellCodeError
  582.     EndIf
  583.     Set RegistryErrorIndex = $($R0)
  584.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  585.         EndWait
  586.         Debug-Output $(InfName)": Registry error: add hardware component"
  587.         CloseRegKey $($R1)
  588.         CloseRegKey $($R2)
  589.         CloseRegKey $($R3)
  590.         GoTo FatalRegistry
  591.     EndIf
  592.  
  593.     Set KeyParameters = $($R3)
  594.     Set KeyAdapterRules = $($R2)
  595.     Set AdapterNumber = $($R4)
  596.     Set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  597.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  598.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  599.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  600.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  601.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  602.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  603.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  604.         Debug-Output $(InfName)": ShellCode error"
  605.         GoTo ShellCodeError
  606.     EndIf
  607.     CloseRegKey $($R1)
  608.  
  609.     Set TempProdName = """"$(ProductHardwareName)$(AdpNumber)""""
  610.     Set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  611.     Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  612.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  613.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  614.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  615.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  616.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  617.         Debug-Output $(InfName)": ShellCode error."
  618.         GoTo ShellCodeError
  619.     EndIf
  620.     Set RegistryErrorIndex = $($R0)
  621.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  622.         EndWait
  623.         Debug-Output $(InfName)": Registry error: add value list."
  624.         CloseRegKey $(KeyParameters)
  625.         CloseRegKey $(KeyAdapterRules)
  626.         GoTo FatalRegistry
  627.     EndIf
  628.     CloseRegKey $(KeyAdapterRules)
  629.  
  630.     GoTo WriteParameters
  631.  
  632. ;***********************************************************************
  633. ;
  634. ;***********************************************************************
  635. WriteParameters = +
  636. ;;; You need one address entry in the list for each channel on your device.
  637. ;;; FIXME - at this point RAS requires there to be one logical line per address
  638. ;;; FIXME - so the address (channel) number is ignored and the line number is used
  639.  
  640.  
  641.     IfStr(i) $(!NTN_InstallMode) == install
  642.         RunProgram RunCode "U.S. Robotics Sportster ISDN 128K Setup Disk" "" $(!STF_WINDOWSSYSPATH)\fxbricfg.exe $(AdpNumber) 0
  643.     Else
  644.         RunProgram RunCode "U.S. Robotics Sportster ISDN 128K Setup Disk" "" $(!STF_WINDOWSSYSPATH)\fxbricfg.exe $(AdpNumber) 1
  645.     Endif        
  646.  
  647.  
  648.     Set TapiAddressList = {$(AdpNumber)"-1-0"}
  649.     Set TapiAddressList = >($(TapiAddressList),$(AdpNumber)"-2-0")
  650.  
  651.        Set NewValueList = {+
  652.                {AddressList,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  653.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  654.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
  655.                {DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  656.                {LineType,$(NoTitle),$(!REG_VT_DWORD),$(LineType)},+
  657.                {MediaType,$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
  658.                {ADP_Number,$(NoTitle),$(!REG_VT_DWORD),$(AdpNumber)},+
  659.                }
  660.  
  661.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  662.     CloseRegKey $(KeyParameters)
  663.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  664.         Debug-Output $(InfName)": ShellCode error."
  665.         GoTo ShellCodeError
  666.     EndIf
  667.     Set RegistryErrorIndex = $($R0)
  668.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  669.         Debug-Output $(InfName)": Registry error: Add value list"
  670.         GoTo FatalRegistry
  671.     EndIf
  672.     ;
  673.     ; Skip TAPI/RAS setup if already installed.
  674.     ;
  675.     IfStr(i) $(!NTN_InstallMode) == configure
  676.         Debug-Output $(InfName)"going to successful option!"
  677.         GoTo SuccessfulOption
  678.     EndIf
  679.     ;
  680.     ; Create the HARDWARE\DEVICEMAP\TAPI DEVICES\USRBRI key
  681.     ;
  682.     Debug-Output $(InfName)": devicemap\tapidevices\usrbri!"
  683.  
  684.     OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(MAXIMUM_ALLOWED) BaseKey
  685.     Set TapiKeyName = "TAPI DEVICES\USRBRI"
  686. ;    Set TapiKeyName = "TAPI DEVICES\USRBRI"$(AdpNumber)
  687.  
  688. ;-------------
  689. ; If we are installing more than one card at a time, there may already be
  690. ; address list data in the TAPI DEVICES\USRBRI Address list. Grab the
  691. ; current contents. We'll add our new ones to the current ones.
  692. ;
  693.     set CurrentAddressListKeyName = "HARDWARE\DEVICEMAP\"$(TapiKeyName)
  694.     OpenRegKey $(!REG_H_LOCAL) "" $(CurrentAddressListKeyName) $(MAXIMUM_ALLOWED) CurrentAddressListHandle
  695.     ifstr(i) $(CurrentAddressListHandle) != $(KeyNull)
  696.         GetRegValue $(CurrentAddressListHandle),"Address", CurrentAddressListInfo
  697.         set CurrentAddressList = *($(CurrentAddressListInfo), 4)
  698.         Debug-Output "   CurrentAddressList = "$(CurrentAddressList)
  699.     else
  700.         Debug-Output "  No current address list "
  701.     endif
  702.     CloseRegKey $(CurrentAddressListHandle)
  703.  
  704.     set AddressList = {}
  705.     ifstr(i) $(CurrentAddressList) != ""
  706.         ForListDo $(CurrentAddressList)
  707.             Set ValueItem = $($)
  708.             Debug-Output $(InfName)": "$(ValueItem)"="$(ValueItem)
  709.             Set AddressList = >($(AddressList),$(ValueItem))
  710.         EndForListDo
  711.  
  712.         ForListDo $(TapiAddressList)
  713.             Set ValueItem = $($)
  714.             Debug-Output $(InfName)": "$(ValueItem)"="$(ValueItem)
  715.             Set AddressList = >($(AddressList),$(ValueItem))
  716.         EndForListDo
  717.     else
  718.         ForListDo $(TapiAddressList)
  719.             Set ValueItem = $($)
  720.             Debug-Output $(InfName)": "$(ValueItem)"="$(ValueItem)
  721.             Set AddressList = >($(AddressList),$(ValueItem))
  722.         EndForListDo
  723.     endif
  724.     Debug-Output $(InfName)": Final AddressList="$(AddressList)
  725.  
  726. ;--------------
  727.  
  728.     shell "" HtCreateRegKey $(BaseKey) $(TapiKeyName)
  729.     IfStr(i) $($R0) != NO_ERROR
  730.         Debug-Output $(InfName)": Error creating registry key!"
  731.         GoTo FatalRegistry
  732.     EndIf
  733.     Set TapiDeviceKey = $($R1)
  734.  
  735.     Set NewValueList = {+
  736.                        {Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(AddressList)},+
  737.                        {"Media Type",$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)}}
  738.     Shell  $(UtilityInf), AddValueList, $(TapiDeviceKey), $(NewValueList)
  739.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  740.         Debug-Output $(InfName)": ShellCode error."
  741.         GoTo ShellCodeError
  742.     EndIf
  743.     Set RegistryErrorIndex = $($R0)
  744.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  745.         Debug-Output $(InfName)": Registry error: Add value list"
  746.         GoTo FatalRegistry
  747.     EndIf
  748.     CloseRegKey $(TapiDeviceKey)
  749.     CloseRegKey $(BaseKey)
  750.  
  751.     IfInt $(CreateIcons) == $(TRUE)
  752.       Install CreateUSRGroup
  753.     Endif
  754.  
  755.     ;
  756.     ; if RAS is not installed, then shell ras setup INF file to install RAS
  757.     ; else invoke RAS to allow user to configure RAS for Switch56. 
  758.     ;
  759.     Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
  760.     Shell "oemnsvra.inf" CheckRasInstalled
  761.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  762.         Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
  763.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE),  +
  764.                 "STATUS", $(InvokeRasError)
  765.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  766.             GoTo ShellCodeError
  767.         EndIf
  768.     EndIf
  769.     ;
  770.     Set RasInstalled = $($R0)
  771.     Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled)
  772.     ;
  773.     ; display a message to the user that RAS setup will now be invoked
  774.     ;
  775.     IfStr(i) $(RasInstalled) == FALSE
  776.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  777.                 $(InvokeRasNotMsg)
  778.         GoTo SuccessfulOption
  779.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  780.             GoTo SuccessfulOption
  781.         EndIf
  782.     Else
  783.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  784.                 $(InvokeRasConfigMsg)
  785.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  786.             GoTo SuccessfulOption
  787.         EndIf
  788.     EndIf
  789.     ;
  790.     ; FIXME - RAS INF will not locate the files if it is spawned here.
  791.     ;
  792.     EndWait
  793.  
  794.     ;
  795.     ; Set the flags based on whether this is an IDW installation
  796.     ;
  797.     IfStr(i) $(!STF_IDW) == TRUE
  798.         Set AddCopy  = NO
  799.         Set DoCopy   = NO
  800.         Set DoConfig = NO
  801.     Else
  802.         Set AddCopy  = YES
  803.         Set DoCopy   = YES
  804.         Set DoConfig = YES
  805.     EndIf
  806.     ;
  807.     ; change the global install mode flag to configure if RAS is already installed
  808.     ;
  809.     IfStr(i) $(RasInstalled) == TRUE
  810.             Set SaveNTN_InstallMode = $(!NTN_InstallMode)
  811.             Set !NTN_InstallMode = configure
  812.     Else        
  813.         GoTo SuccessfulOption
  814.     EndIf
  815.     ;
  816.     ; now invoke RAS setup to do the right thing
  817.     ;
  818.     Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig)
  819.     ;
  820.     ; restore the global instal mode flag if it was changed
  821.     ;
  822.     IfStr(i) $(RasInstalled) == TRUE
  823.             Set !NTN_InstallMode = $(SaveNTN_InstallMode)
  824.     EndIf
  825.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  826.         Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
  827.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
  828.                 $(InvokeRasError)
  829.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  830.             GoTo ShellCodeError
  831.         EndIf
  832.         GoTo SuccessfulOption
  833.     EndIf
  834.  
  835.     EndWait
  836.     GoTo SuccessfulOption
  837.  
  838. ;***********************************************************************
  839. ;
  840. ;***********************************************************************
  841. BindingAdapter =+
  842.     Set Error = "Binding: Sorry, not yet implemented."
  843.     GoTo FatalError
  844.  
  845. ;***********************************************************************
  846. ;
  847. ;***********************************************************************
  848. RemoveAdapter = +
  849.  
  850.     Debug-Output "$(InfName): Entering RemoveAdapter"
  851.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyToReferenceCount
  852.     Ifstr $(KeyToReferenceCount) == ""
  853.         Debug-Output "$(InfName): Could not open Software Base Key"
  854.         set RefCountBeforeRemove = 2
  855.         GoTo FatalRegistry
  856.     endif
  857.     GetRegValue $(KeyToReferenceCount),"RefCount", RefCountInfo
  858.     set RefCountBeforeRemove = *($(RefCountInfo), 4)
  859.     CloseRegKey $(KeyToReferenceCount)
  860.     ifInt $(RefCountBeforeRemove) == 1
  861.         Debug-Output $(InfName)": ref 1"
  862.     else
  863.         Debug-Output $(InfName)": ref2 - not deleting"
  864.         set DeleteIcons = $(FALSE)
  865.     Endif
  866.  
  867.  
  868.     IfStr $(KeyProduct) == $(KeyNull)
  869.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  870.         IfStr $(KeyProduct) == $(KeyNull)
  871.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  872.             Debug-Output $(InfName)": Cannot find component product key"
  873.             GoTo FatalRegistry
  874.         EndIf
  875.     EndIf
  876.  
  877.     Debug-Output $(InfName)": Shelling to FindService"
  878.     Shell $(UtilityInf) FindService, $(KeyProduct)
  879.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  880.         Debug-Output $(InfName)": FindService shell failure"
  881.         GoTo ShellCodeError
  882.     EndIf
  883.     IfStr(i) $($R0) != NO_ERROR
  884.         Debug-Output $(InfName)": FindService Shell error: "$($R0)
  885.         GoTo FatalRegistry
  886.     EndIf
  887.  
  888.     Set KeyParameters = $($R2)
  889.     CloseRegKey $($R1)
  890.     IfStr $(KeyParameters) == $(KeyNull)
  891.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  892.         Debug-Output $(InfName)": Cannot find component service"
  893.         GoTo FatalRegistry
  894.     EndIf
  895.  
  896.     Set OldVersionExisted = $(TRUE)
  897.     Set ValueName = ""
  898.     Set ValueData = ""
  899.     Set ValueStr  = ""
  900.     Set ValueList = {}
  901.     EnumRegValue $(KeyParameters) ValueList
  902.     ForListDo $(ValueList)
  903.         Set ValueItem = $($)
  904.         Set ValueName = *($(ValueItem),1)
  905.         Set ValueData = *($(ValueItem),4)
  906.         Debug-Output $(InfName)": "$(ValueName)"="$(ValueData)
  907.         IfStr(i) $(ValueName) == "ADP_Number"
  908.             set AdpNumber = $(ValueData)
  909.         EndIf
  910.     EndForListDo
  911.     Set DelTapiKeyName = "HARDWARE\DEVICEMAP\TAPI DEVICES\USRBRI"
  912. ;    Set DelTapiKeyName = "HARDWARE\DEVICEMAP\TAPI DEVICES\USRBRI"$(AdpNumber)
  913.     DeleteRegKey $(!REG_H_LOCAL) $(DelTapiKeyName)
  914.  
  915.     IfInt $(DeleteIcons) == $(TRUE)
  916.         ;
  917.         ; Delete the support files 
  918.         ;
  919.  
  920.         set RemoveList = {}
  921.         set RemoveList = >($(RemoveList), #(Files-RemoveList, USRBRISYS, 1))
  922.         set RemoveList = >($(RemoveList), #(Files-RemoveList, USRBRIDWN, 1))
  923.         set RemoveList = >($(RemoveList), #(Files-RemoveList, FXBRICFG, 1))
  924.         set RemoveList = >($(RemoveList), #(Files-RemoveList, FXBRIHLP , 1))
  925.         set RemoveList = >($(RemoveList), #(Files-RemoveList, FXSHOWEXE, 1))
  926.         set RemoveList = >($(RemoveList), #(Files-RemoveList, FXMONEXE, 1))
  927.         set RemoveList = >($(RemoveList), #(Files-RemoveList, TOOLS, 1))
  928.         set RemoveList = >($(RemoveList), #(Files-RemoveList, RLSNOTES, 1))
  929.  
  930.         ForListDo $(RemoveList)
  931.             Debug-Output "Removing "$($)
  932.             LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  933.             Debug-Output "Status is "$(Status)
  934.         EndForListDo
  935.  
  936.         ;
  937.         ; Remove the program group
  938.         ;
  939.         ;
  940.  
  941.         Install RemoveUSRGroup
  942.  
  943.         ;
  944.         ; Done deleting files and program group
  945.         ;
  946.  
  947.     Endif
  948.  
  949.     IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  950.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  951.             $(ProductSoftwareName)
  952.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  953.             Debug-Output $(InfName)": ShellCode error"
  954.             GoTo ShellCodeError
  955.         EndIf
  956.         Set RegistryErrorIndex = $($R0)
  957.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  958.             GoTo FatalRegistry
  959.         EndIf
  960.     Else
  961.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  962.             $(ProductSoftwareName), $(!NTN_RegBase)
  963.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  964.             Debug-Output $(InfName)": ShellCode error"
  965.             GoTo ShellCodeError
  966.         EndIf
  967.         Set RegistryErrorIndex = $($R0)
  968.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  969.             GoTo FatalRegistry
  970.         EndIf
  971.     EndIf
  972.  
  973.  
  974.     GoTo end
  975.  
  976. ;***********************************************************************
  977. ;
  978. ;***********************************************************************
  979. UpgradeSoftware = +
  980.     IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  981.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  982.         IfStr $(KeyProduct) != $(KeyNull)
  983.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  984.             Set Version = *($(VersionInfo), 4)
  985.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  986.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  987.                 Debug-Output $(InfName)": ShellCode error"
  988.                 GoTo ShellCodeError
  989.             EndIf
  990.             Set !UG_Filename = $($R0)
  991.             IfStr(i) $(!UG_Filename) != ""
  992.                 install "Install-Update"
  993.                 IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  994.                     GoTo FatalError
  995.                 EndIf
  996.             EndIf
  997.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  998.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  999.             IfInt $(Version) != $(ProductVersion)
  1000.             EndIf
  1001.             CloseRegKey $(KeyProduct)
  1002.         Else
  1003.             GoTo FatalRegistry
  1004.         EndIf
  1005.     Else
  1006.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1007.               $(MAXIMUM_ALLOWED) NetworkCardKey
  1008.         IfStr(i) $(NetworkCardKey) != $(KeyNull)
  1009.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1010.             Set ServiceName = *($(ServiceNameInfo), 4)
  1011.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1012.                 $(MAXIMUM_ALLOWED) NetRuleKey
  1013.             IfStr(i) $(NetRuleKey) != $(KeyNull)
  1014.             Else
  1015.                 GoTo FatalRegistry
  1016.             EndIf
  1017.             CloseRegKey $(NetRules)
  1018.             CloseRegKey $(NetworkCardKey)
  1019.         Else
  1020.             GoTo FatalRegistry
  1021.         EndIf
  1022.         OpenRegKey $(!REG_H_LOCAL) "" +
  1023.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  1024.               $(MAXIMUM_ALLOWED) ServiceKey
  1025.         IfStr(i) $(ServiceKey) != $(KeyNull)
  1026.             CloseRegKey $(ServiceKey)
  1027.         Else
  1028.             GoTo FatalRegistry
  1029.         EndIf
  1030.     EndIf
  1031.     GoTo end
  1032.  
  1033. ;***********************************************************************
  1034. ;
  1035. ;***********************************************************************
  1036. SuccessfulOption = +
  1037.     GoTo end
  1038.  
  1039. ;***********************************************************************
  1040. ;
  1041. ;***********************************************************************
  1042. Abandon = +
  1043.     ForListDo $(OEM_ABANDON_OPTIONS)
  1044.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1045.             $(ProductSoftwareName), $($)
  1046.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1047.             Debug-Output $(InfName)": ShellCode error"
  1048.             GoTo ShellCodeError
  1049.         EndIf
  1050.         Set RegistryErrorIndex = $($R0)
  1051.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1052.             GoTo FatalRegistry
  1053.         EndIf
  1054.     EndForListDo
  1055.     IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1056.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1057.             $(ProductSoftwareName), FALSE
  1058.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1059.             Debug-Output $(InfName)": ShellCode error"
  1060.             GoTo ShellCodeError
  1061.         EndIf
  1062.         Set RegistryErrorIndex = $($R0)
  1063.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1064.             GoTo FatalRegistry
  1065.         EndIf
  1066.     EndIf
  1067.     GoTo end
  1068.  
  1069. ;***********************************************************************
  1070. ;
  1071. ;***********************************************************************
  1072. WarningMsg = +
  1073.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1074.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1075.         GoTo ShellCodeError
  1076.     EndIf
  1077.     IfStr(i) $($R1) == "OK"
  1078.         GoTo $(to)
  1079.     Else-IfStr(i) $($R1) == "CANCEL"
  1080.         GoTo $(from)
  1081.     EndIf
  1082.     GoTo end
  1083.  
  1084. ;***********************************************************************
  1085. ;
  1086. ;***********************************************************************
  1087. NonFatalInfo = +
  1088.     Set Severity = STATUS
  1089.     Set CommonStatus = STATUS_USERCANCEL
  1090.     IfStr(i) $(Error) == ""
  1091.         Set Severity = NONFATAL
  1092.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1093.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1094.             GoTo ShellCodeError
  1095.         EndIf
  1096.         Set Error = $($R0)
  1097.     EndIf
  1098.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1099.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1100.         GoTo ShellCodeError
  1101.     EndIf
  1102.     IfStr(i) $($R1) == "OK"
  1103.         GoTo $(from)
  1104.     EndIf
  1105.     GoTo end
  1106.  
  1107. ;***********************************************************************
  1108. ;
  1109. ;***********************************************************************
  1110. FatalRegistry = +
  1111.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1112.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1113.         GoTo ShellCodeError
  1114.     EndIf
  1115.     Set Error = $($R0)
  1116.     GoTo FatalError
  1117.  
  1118. ;***********************************************************************
  1119. ;
  1120. ;***********************************************************************
  1121. FatalDetect = +
  1122.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1123.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1124.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  1125.         GoTo ShellCodeError
  1126.     EndIf
  1127.     Set Error = $($R0)
  1128.     GoTo FatalError
  1129.  
  1130. ;***********************************************************************
  1131. ;
  1132. ;***********************************************************************
  1133. FatalError = +
  1134.     IfStr(i) $(Error) == ""
  1135.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1136.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1137.             GoTo ShellCodeError
  1138.         EndIf
  1139.         Set Error = $($R0)
  1140.     EndIf
  1141.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1142.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1143.         GoTo ShellCodeError
  1144.     EndIf
  1145.     GoTo SetFailed
  1146.  
  1147. ;***********************************************************************
  1148. ;
  1149. ;***********************************************************************
  1150. ShellCodeError = +
  1151.     Set DlgType      = "MessageBox"
  1152.     Set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1153.     Set STF_MB_TEXT  = $(ShellCodeErrorText)
  1154.     Set STF_MB_TYPE  = 1
  1155.     Set STF_MB_ICON  = 3
  1156.     Set STF_MB_DEF   = 1
  1157.     UI Start "Error Message"
  1158.     GoTo SetFailed
  1159.  
  1160. ;***********************************************************************
  1161. ;
  1162. ;***********************************************************************
  1163. SetFailed = +
  1164.     Set CommonStatus = STATUS_FAILED
  1165.     IfStr(i) $(OEM_ABANDON_ON) == TRUE
  1166.         Set OEM_ABANDON_ON = FALSE
  1167.         GoTo Abandon
  1168.     EndIf
  1169.     GoTo end
  1170.  
  1171. ;***********************************************************************
  1172. ;
  1173. ;***********************************************************************
  1174. end = +
  1175.     Set !DebugOutputControl = $(OldDebugControl)
  1176.     IfInt $(RunCode) == 2
  1177.         Return STATUS_USERCANCEL
  1178.     Else    
  1179.         Return $(CommonStatus)
  1180.     Endif
  1181.  
  1182. ;***********************************************************************
  1183. ;
  1184. ;***********************************************************************
  1185. [CreateUSRGroup]
  1186.     CreateCommonProgManGroup $(USRGroup) ""
  1187.     ShowCommonProgManGroup $(USRGroup), 1
  1188.  
  1189.     CreateCommonProgManItem $(USRGroup), $(USRLineMon) +
  1190.     "%SystemRoot%\system32\USR\BRI\FXMON.EXE" +
  1191.         "" 0
  1192.  
  1193.     CreateCommonProgManItem $(USRGroup), $(USRProtMon) +
  1194.     "%SystemRoot%\system32\USR\BRI\FXSHOW.EXE" +
  1195.         "" 0
  1196.     CreateCommonProgManItem $(USRGroup), $(ToolsGuide) +
  1197.           "NOTEPAD.EXE "+
  1198.           "%SystemRoot%\system32\USR\BRI\TOOLS.TXT" +
  1199.           "PROGMAN.EXE"  29
  1200.  
  1201.     CreateCommonProgManItem $(USRGroup), $(RlsNotes) +
  1202.           "NOTEPAD.EXE "+
  1203.           "%SystemRoot%\system32\USR\BRI\RLSNOTES.TXT" +
  1204.           "PROGMAN.EXE"  29
  1205.  
  1206.     ShowCommonProgManGroup $(USRGroup), 6
  1207.     exit
  1208.  
  1209. ;***********************************************************************
  1210. ;
  1211. ;***********************************************************************
  1212. [RemoveUSRGroup]
  1213.     Debug-Output "Removing icons from "$(USRGroup)
  1214.     CreateCommonProgManGroup $(USRGroup) ""
  1215.     RemoveCommonProgManGroup $(USRGroup)
  1216.     exit
  1217.  
  1218. ;***********************************************************************
  1219. ;
  1220. ;***********************************************************************
  1221. [HtCreateRegKey]
  1222.     Debug-Output $(InfName)": Entering [HtCreateRegKey]"
  1223.     Set ECR_Result          = NO_ERROR
  1224.     Set ECR_BaseKeyHandle   = $($0)
  1225.     Set ECR_NewPath         = $($1)
  1226.     Set KeyNull             = ""
  1227.     Set MAXIMUM_ALLOWED     = 33554432
  1228.  
  1229.     Debug-Output $(InfName)": HtCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1230.     Debug-Output $(InfName)":                  ECR_NewPath       = "$(ECR_NewPath)
  1231.     Debug-Output $(InfName)":                  MAXIMUM_ALLOWED   = "$(MAXIMUM_ALLOWED)
  1232.     Debug-Output $(InfName)":                  KeyNull           = "$(KeyNull)
  1233.  
  1234.     OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1235.                ECR_BaseKey
  1236.     Debug-Output $(InfName)": ECR_BaseKey = "$(ECR_BaseKey)
  1237.     Debug-Output $(InfName)":     OpenRegKey returned "$($R0)
  1238.     IfStr $(ECR_BaseKey) == $(KeyNull)
  1239.         Debug-Output $(InfName)": ECR_BaseKey == KeyNull"
  1240.     Else
  1241.         Debug-Output $(InfName)": ECR_BaseKey != KeyNull"
  1242.         Set ECR_KeyHandle = $(ECR_BaseKey)
  1243.         GoTo  ECR_Return
  1244.     EndIf
  1245.  
  1246.     Set ECR_TmpPath = ""
  1247.     Split-String $(ECR_NewPath) "\" ECR_PList
  1248.     Debug-Output $(InfName)": ECR_PList = "$(ECR_PList)
  1249.     ForListDo $(ECR_PList)
  1250.         IfStr(i) $($) != "\"
  1251.             IfInt $(#) == 1
  1252.                 Set ECR_TmpPath = $($)
  1253.             Else
  1254.                 Set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  1255.             EndIf
  1256.             Debug-Output $(InfName)": Determining if "$(ECR_TmpPath)" exists"
  1257.             OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  1258.             IfStr $(ECR_BaseKey) == $(KeyNull)
  1259.                 Debug-Output $(InfName)": Creating "$(ECR_TmpPath)
  1260.                 CreateRegKey $(ECR_BaseKeyHandle)  {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  1261.                 IfStr(i) $(ECR_KeyHandle) == $(KeyNull)
  1262.                     Set ECR_Result = $($R0)
  1263.                     GoTo ECR_Return
  1264.                 EndIf
  1265.             EndIf
  1266.         EndIf
  1267.     EndForListDo
  1268. ECR_Return = +
  1269.     Return $(ECR_Result) $(ECR_KeyHandle)
  1270.  
  1271. ;***********************************************************************
  1272. ;
  1273. ;***********************************************************************
  1274. [DebugConfiguration]
  1275.     Debug-Output $(!p:InfName)": **CONFIGURATION STATE: "$($0)
  1276.     Debug-Output $(!p:InfName)": InterruptNumber is "$(!p:InterruptNumber)
  1277.     Debug-Output $(!p:InfName)": RamBaseAddress  is "$(!p:RamBaseAddress)
  1278.     Return
  1279.  
  1280. ;***********************************************************************
  1281. ;
  1282. ;***********************************************************************
  1283. [Install-Option]
  1284.     Set STF_VITAL = ""
  1285.     IfStr(i) $(AddCopy) == "YES"
  1286.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1287.         AddSectionFilesToCopyList Files-System $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1288.         AddSectionFilesToCopyList Files-Support $(SrcDir) $(ProductPath)
  1289.     EndIf
  1290.     CreateDir $(USRDir)
  1291.     CreateDir $(USRBRIDir)
  1292.     IfStr(i) $(DoCopy) == "YES"
  1293.        Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1294.        CopyFilesInCopyList
  1295.     EndIf
  1296.     Exit
  1297.  
  1298. ;***********************************************************************
  1299. ;
  1300. ;***********************************************************************
  1301. [Install-Update]
  1302.    Set STF_VITAL        = ""
  1303.    Set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1304.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1305.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1306.    AddSectionFilesToCopyList Files-System $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1307.    Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1308.    CopyFilesInCopyList
  1309.    Exit
  1310.  
  1311. ;***********************************************************************
  1312. ;
  1313. ;***********************************************************************
  1314. [Source Media Descriptions]
  1315.     1  = "U.S. Robotics Sportster ISDN 128K Setup Disk" 
  1316.  
  1317. [Signature]
  1318.     FileType = MICROSOFT_DRVLIB_FILE
  1319. [GetSignature]
  1320.     read-syms Signature
  1321.     return $(FileType)
  1322.  
  1323. ;***********************************************************************
  1324. ;
  1325. ;***********************************************************************
  1326. [ProductType]
  1327.     STF_PRODUCT         = Winnt
  1328.     STF_PLATFORM        = I386
  1329.  
  1330. ;***********************************************************************
  1331. ;
  1332. ;***********************************************************************
  1333. [Files-Inf]
  1334.     1, oemsetnt.inf, SIZE=49000, RENAME=$(!UG_Filename)
  1335.  
  1336. ;***********************************************************************
  1337. ;
  1338. ;***********************************************************************
  1339. [Files-USRBRI]
  1340.     1, USRBRI.SYS, SIZE=262000
  1341.     1, USRBRI.DWN, SIZE=40000
  1342.  
  1343. ;***********************************************************************
  1344. ;
  1345. ;***********************************************************************
  1346. [Files-System]
  1347.     1, FXBRI.HLP,    SIZE=16000
  1348.     1, FXBRICFG.EXE, SIZE=31000
  1349.  
  1350. ;***********************************************************************
  1351. ;
  1352. ;***********************************************************************
  1353. [Files-Support]
  1354.     1, FXSHOW.EXE, SIZE=60000
  1355.     1, FXMON.EXE, SIZE=60000
  1356.     1, TOOLS.TXT, SIZE=60000
  1357.     1, RLSNOTES.TXT, SIZE=60000
  1358.  
  1359. ;***********************************************************************
  1360. ;
  1361. ;***********************************************************************
  1362.  
  1363. [Files-RemoveList]
  1364. USRBRISYS      = $(!STF_WINDOWSSYSPATH)\drivers\usrbri.sys
  1365. USRBRIDWN      = $(!STF_WINDOWSSYSPATH)\drivers\usrbri.dwn
  1366. FXBRICFG       = $(!STF_WINDOWSSYSPATH)\fxbricfg.exe
  1367. FXBRIHLP       = $(!STF_WINDOWSSYSPATH)\fxbri.hlp
  1368. FXSHOWEXE      = $(!STF_WINDOWSSYSPATH)\usr\bri\FXSHOW.EXE
  1369. FXMONEXE      = $(!STF_WINDOWSSYSPATH)\usr\bri\FXMON.EXE
  1370. TOOLS          = $(!STF_WINDOWSSYSPATH)\usr\bri\TOOLS.TXT
  1371. RLSNOTES       = $(!STF_WINDOWSSYSPATH)\usr\bri\RLSNOTES.TXT
  1372.  
  1373. ;***********************************************************************
  1374. ;
  1375. ;***********************************************************************
  1376. [LanguagesSupported]
  1377.     ENG
  1378.  
  1379. ;***********************************************************************
  1380. ;
  1381. ;***********************************************************************
  1382. [OptionsTextENG]
  1383.     USRBRI             = "U.S. Robotics Sportster ISDN Adapter"
  1384.  
  1385. ;***********************************************************************
  1386. ;
  1387. ;***********************************************************************
  1388. [FileConstantsENG]
  1389.     ProCaption          = "Windows NT Setup"
  1390.     ProCancel           = "Cancel"
  1391.     ProCancelMsg        = "Windows NT Networking is not correctly installed.  "+
  1392.                           "Are you sure you want to cancel copying files?"
  1393.     ProCancelCap        = "Network Setup Message"
  1394.     ProText1            = "Copying:"
  1395.     ProText2            = "To:"
  1396.  
  1397.     FunctionTitleUSRBRI                 = "U.S. Robotics Sportster ISDN 128K Setup"
  1398.     ProductSoftwareDescription         = "U.S. Robotics Sportster ISDN 128K"
  1399.     ProductHardwareUSRBRIDescription    = "U.S. Robotics Sportster ISDN 128K"
  1400.     ProductSoftwareTitle               = "U.S. Robotics Sportster ISDN 128K"
  1401.     ProductHardwareUSRBRITitle          = "U.S. Robotics Sportster ISDN 128K"
  1402.  
  1403.     ShellCodeErrorTitle                = "Error: "$(FunctionTitle)$(Option))
  1404.     ShellCodeErrorText                 = "Shell Code Error."
  1405.  
  1406. ;***********************************************************************
  1407. ;
  1408. ;***********************************************************************
  1409. [InvokeRasDlgENG]
  1410.     InvokeRasSetupMsg   = "U.S. Robotics Sportster ISDN 128K setup is complete. Remote Access "+
  1411.                           "Services (RAS) must now be installed. Please configure"+
  1412.                           "the USR_BRIISDNn ports in RAS setup to enable "+
  1413.                           "you to use RAS over the U.S. Robotics BRI Adapter."
  1414.     InvokeRasConfigMsg  = "U.S. Robotics BRI setup is complete. Remote Access "+
  1415.                           "Services (RAS) setup must now be invoked. Please "+
  1416.                           "configure the USR_BRIISDNn ports in RAS setup to "+
  1417.                           "enable you to use RAS over the U.S. Robotics BRI Adapter."
  1418.     InvokeRasError      = "U.S. Robotics BRI setup encountered an error while "+
  1419.                           "invoking the RAS setup INF file (OEMNSVRA.INF). "+
  1420.                           "Please make sure that the file is present in the "+
  1421.                           "System32 directory and is the proper file." 
  1422.     InvokeRasNotMsg     = "U.S. Robotics Sportster ISDN 128K setup is complete. The Remote "+
  1423.                           "Access Services (RAS) are not installed. Please "+
  1424.                           "install the the RAS and configure the USR_BRIISDNn "+
  1425.                           "ports in RAS setup to enable you to use RAS over "+
  1426.                           "over the U.S. Robotics BRI Adapter."
  1427.  
  1428.